﻿using ch07.binary.type;

namespace ch07.binary.interpreter
{
    public class GlobalVar
    {
        internal GlobalType _type;
        public ulong val;

        public ulong GetAsU64()
        {
            return val;
        }
        
        public   void SetAsU64(ulong val ) {
            if (_type.Mut != 1)
            {
                Panic.Run(Errors.ErrImmutableGlobal);
            }

            this.val = val;
        }

    }
}